<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.8"/>
<title>OpenRF: OpenRF MAC Layer</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">OpenRF
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.8 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
</div><!-- top -->
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Data Structures</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Modules</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark">&#160;</span>Pages</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#nested-classes">Data Structures</a> &#124;
<a href="#define-members">Macros</a> &#124;
<a href="#typedef-members">Typedefs</a> &#124;
<a href="#enum-members">Enumerations</a> &#124;
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">OpenRF MAC Layer</div>  </div>
</div><!--header-->
<div class="contents">
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="nested-classes"></a>
Data Structures</h2></td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structt_open_r_f_initializer.html">tOpenRFInitializer</a></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="define-members"></a>
Macros</h2></td></tr>
<tr class="memitem:ga274981d1839415622b1627eab92cade5"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga274981d1839415622b1627eab92cade5"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><b>kMaxMessageQueueSize</b>&#160;&#160;&#160;4</td></tr>
<tr class="separator:ga274981d1839415622b1627eab92cade5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gabd8b08c2094e3f6166c870f650260bf2"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="gabd8b08c2094e3f6166c870f650260bf2"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><b>OpenRFSetHopTable</b>(x)&#160;&#160;&#160;RadioSetHopTable(x)</td></tr>
<tr class="separator:gabd8b08c2094e3f6166c870f650260bf2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga9e0846ed2eafb628caebe9cfba869e32"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga9e0846ed2eafb628caebe9cfba869e32"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><b>OpenRFSetTxPower</b>(x)&#160;&#160;&#160;<a class="el" href="group___radio.html#ga6fab90d6a25b4a983841e4f7e824b611">RadioSetTxPower</a>(x)</td></tr>
<tr class="separator:ga9e0846ed2eafb628caebe9cfba869e32"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga11213359b4220261fd3e3824f5aa7a90"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga11213359b4220261fd3e3824f5aa7a90"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><b>OpenRFSetChannel</b>(x)&#160;&#160;&#160;<a class="el" href="group___radio.html#ga4433194a2153ba9e045a08309a979f00">RadioSetChannel</a>(x)</td></tr>
<tr class="separator:ga11213359b4220261fd3e3824f5aa7a90"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="typedef-members"></a>
Typedefs</h2></td></tr>
<tr class="memitem:ga567d0717738c6d44e1f07b753407ac31"><td class="memItemLeft" align="right" valign="top">typedef struct <a class="el" href="structt_open_r_f_initializer.html">tOpenRFInitializer</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___open_r_f.html#ga567d0717738c6d44e1f07b753407ac31">tOpenRFInitializer</a></td></tr>
<tr class="separator:ga567d0717738c6d44e1f07b753407ac31"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="enum-members"></a>
Enumerations</h2></td></tr>
<tr class="memitem:ga28163474abc4f10ccf9241e6c0a1422e"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___open_r_f.html#ga28163474abc4f10ccf9241e6c0a1422e">tListenModes</a> { <a class="el" href="group___open_r_f.html#gga28163474abc4f10ccf9241e6c0a1422ea54a69a9ab72289fb1f93bca56e7349ab">kBlockingListenForPacket</a>, 
<a class="el" href="group___open_r_f.html#gga28163474abc4f10ccf9241e6c0a1422ea9da7444f0f36e477afb09e13e249ddab">kBlockingDetectChannelActivity</a>, 
<a class="el" href="group___open_r_f.html#gga28163474abc4f10ccf9241e6c0a1422ea8b854978b0c33269d0abca27cd940967">kListenForPacket</a>, 
<a class="el" href="group___open_r_f.html#gga28163474abc4f10ccf9241e6c0a1422ea621cc4768aff539cfec1fc9814a8befa">kDetectChannelActivity</a>
 }</td></tr>
<tr class="separator:ga28163474abc4f10ccf9241e6c0a1422e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga0191e76d54bb003723263a47fa9a7101"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___open_r_f.html#ga0191e76d54bb003723263a47fa9a7101">tOpenRFStates</a> { <br />
&#160;&#160;<a class="el" href="group___open_r_f.html#gga0191e76d54bb003723263a47fa9a7101a19d8199da79ca4c28eb644052b08f632">kIdle</a>, 
<a class="el" href="group___open_r_f.html#gga0191e76d54bb003723263a47fa9a7101aa20cbba7c3fbef0687f9aad998e94a0e">kTransmitting</a>, 
<a class="el" href="group___open_r_f.html#gga0191e76d54bb003723263a47fa9a7101ad6cfbd04bb1785e5347062ce124ec4dc">kListening</a>, 
<a class="el" href="group___open_r_f.html#gga0191e76d54bb003723263a47fa9a7101add8280cdb1cba70addb16dee65ca02e6">kWaitingForAck</a>, 
<br />
&#160;&#160;<a class="el" href="group___open_r_f.html#gga0191e76d54bb003723263a47fa9a7101a6d54cce02512d451a161a1d1dcf273e6">kSendAck</a>, 
<a class="el" href="group___open_r_f.html#gga0191e76d54bb003723263a47fa9a7101a159a728c690010955c411e6dc314e4eb">kSendingAck</a>, 
<a class="el" href="group___open_r_f.html#gga0191e76d54bb003723263a47fa9a7101a2b19c68e5a1e48fcb1227d09382413de">kAckRequired</a>, 
<a class="el" href="group___open_r_f.html#gga0191e76d54bb003723263a47fa9a7101a6a5907d52deb390eec3e544e19e45b33">kReceiving</a>, 
<br />
&#160;&#160;<a class="el" href="group___open_r_f.html#gga0191e76d54bb003723263a47fa9a7101a9b1fddf44bce966b60624b8566da0f5e">kPacketReceived</a>, 
<a class="el" href="group___open_r_f.html#gga0191e76d54bb003723263a47fa9a7101a1bec80a402b7a72ae776bf8631871643">kPacketTransmitted</a>, 
<a class="el" href="group___open_r_f.html#gga0191e76d54bb003723263a47fa9a7101a74a1f26f67179126aeb97c91122d251f">kRadioError</a>
<br />
 }</td></tr>
<tr class="separator:ga0191e76d54bb003723263a47fa9a7101"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga75b3ac4a450160131d80d0178b974101"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___open_r_f.html#ga75b3ac4a450160131d80d0178b974101">tTransmitErrors</a> { <a class="el" href="group___open_r_f.html#gga75b3ac4a450160131d80d0178b974101a09c3a6fa88cf4c80c7516b2d657894a5">kNoAck</a>, 
<a class="el" href="group___open_r_f.html#gga75b3ac4a450160131d80d0178b974101af83ce339764c3382ff1436195925846d">kFifoUnderflow</a>, 
<a class="el" href="group___open_r_f.html#gga75b3ac4a450160131d80d0178b974101a02dea8a7ec5fd46f76769a41e827093b">kFifoOverflow</a>, 
<a class="el" href="group___open_r_f.html#gga75b3ac4a450160131d80d0178b974101af2cd3231820315500697550960956126">kUndefined</a>
 }</td></tr>
<tr class="separator:ga75b3ac4a450160131d80d0178b974101"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga0a276b3957264b6d9a4ee7af297d0b34"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___open_r_f.html#ga0a276b3957264b6d9a4ee7af297d0b34">tHoppingMode</a> { <a class="el" href="group___open_r_f.html#gga0a276b3957264b6d9a4ee7af297d0b34aca42c074332be0f2a766afb361c34f00">kHopping</a>, 
<a class="el" href="group___open_r_f.html#gga0a276b3957264b6d9a4ee7af297d0b34a6ddd6b8071bdfdeacef32e59eed44e3a">kDTS</a>
 }</td></tr>
<tr class="separator:ga0a276b3957264b6d9a4ee7af297d0b34"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:ga036e1123e06f3f7f7d61146ff6f9a34a"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga036e1123e06f3f7f7d61146ff6f9a34a"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><b>NotifyMacPacketReceived</b> (<a class="el" href="group___radio.html#gaba81c4c5fad7e2e0cef01f8e6c710ecb">tPacketTypes</a> packetType, <a class="el" href="union_u_u32.html">UU32</a> sourceMACAddress, U8 length, U8 *SDU, U8 rssi)</td></tr>
<tr class="separator:ga036e1123e06f3f7f7d61146ff6f9a34a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga1ede19cf399c67a871448530d10612f3"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga1ede19cf399c67a871448530d10612f3"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><b>NotifyMacReceiveError</b> ()</td></tr>
<tr class="separator:ga1ede19cf399c67a871448530d10612f3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaa89410b65ed5797258e3a537b7ded49e"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="gaa89410b65ed5797258e3a537b7ded49e"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><b>NotifyMac1Second</b> ()</td></tr>
<tr class="separator:gaa89410b65ed5797258e3a537b7ded49e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga552a478d353bf70126baede01d9a85d4"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga552a478d353bf70126baede01d9a85d4"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><b>NotifyMacPacketSent</b> ()</td></tr>
<tr class="separator:ga552a478d353bf70126baede01d9a85d4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gabd94bfa8a44ab8f99bb9adcf9a686f40"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="gabd94bfa8a44ab8f99bb9adcf9a686f40"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><b>NotifyMacPacketSendError</b> (<a class="el" href="group___open_r_f.html#ga75b3ac4a450160131d80d0178b974101">tTransmitErrors</a>)</td></tr>
<tr class="separator:gabd94bfa8a44ab8f99bb9adcf9a686f40"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga01e32ac0c6b690f1f9feddee54b43dec"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga01e32ac0c6b690f1f9feddee54b43dec"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><b>NotifyMac1MilliSecond</b> ()</td></tr>
<tr class="separator:ga01e32ac0c6b690f1f9feddee54b43dec"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaed105eca7e470e79e9a2ac4bd4aa8863"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___open_r_f.html#gaed105eca7e470e79e9a2ac4bd4aa8863">OpenRFSendPacket</a> (<a class="el" href="union_u_u32.html">UU32</a> destAddress, <a class="el" href="group___radio.html#gaba81c4c5fad7e2e0cef01f8e6c710ecb">tPacketTypes</a> packetType, U8 length, U8 *txBuffer)</td></tr>
<tr class="separator:gaed105eca7e470e79e9a2ac4bd4aa8863"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga3cbbee7672821bd775d8c9dc295f7b53"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___open_r_f.html#ga3cbbee7672821bd775d8c9dc295f7b53">OpenRFInitialize</a> (<a class="el" href="structt_open_r_f_initializer.html">tOpenRFInitializer</a> ini)</td></tr>
<tr class="separator:ga3cbbee7672821bd775d8c9dc295f7b53"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga6d63157afa39c547cb02c5b71455c2cc"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___open_r_f.html#ga6d63157afa39c547cb02c5b71455c2cc">OpenRFListenForPacket</a> (<a class="el" href="group___radio.html#gaceb4f15c2a65dde634322d4ab88c88ff">tReceiveModes</a> mode, U16 period)</td></tr>
<tr class="separator:ga6d63157afa39c547cb02c5b71455c2cc"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga66e3018afaf75239d092833054be068f"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group___open_r_f.html#ga0191e76d54bb003723263a47fa9a7101">tOpenRFStates</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___open_r_f.html#ga66e3018afaf75239d092833054be068f">OpenRFLoop</a> ()</td></tr>
<tr class="separator:ga66e3018afaf75239d092833054be068f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga796c67f936c99b026c94c11d02cf0900"><td class="memItemLeft" align="right" valign="top">U8&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___open_r_f.html#ga796c67f936c99b026c94c11d02cf0900">OpenRFReadyToSend</a> ()</td></tr>
<tr class="separator:ga796c67f936c99b026c94c11d02cf0900"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga721e6eb444576558b3b0eb11b11068c8"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___open_r_f.html#ga721e6eb444576558b3b0eb11b11068c8">OpenRFSleep</a> (U8 level)</td></tr>
<tr class="separator:ga721e6eb444576558b3b0eb11b11068c8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga125323cedc2d6ffa7a8a6c32d2696111"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___open_r_f.html#ga125323cedc2d6ffa7a8a6c32d2696111">OpenRFSetPreamble</a> (U16 pre)</td></tr>
<tr class="separator:ga125323cedc2d6ffa7a8a6c32d2696111"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<p>This is the OpenRF MAC API. </p>
<h2 class="groupheader">Typedef Documentation</h2>
<a class="anchor" id="ga567d0717738c6d44e1f07b753407ac31"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">typedef struct <a class="el" href="structt_open_r_f_initializer.html">tOpenRFInitializer</a>  <a class="el" href="structt_open_r_f_initializer.html">tOpenRFInitializer</a></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Initializer for OpenRF. Passes parameters into initialization function </p>

</div>
</div>
<h2 class="groupheader">Enumeration Type Documentation</h2>
<a class="anchor" id="ga0a276b3957264b6d9a4ee7af297d0b34"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">enum <a class="el" href="group___open_r_f.html#ga0a276b3957264b6d9a4ee7af297d0b34">tHoppingMode</a></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Enumerates OpenRF hopping modes </p>
<table class="fieldtable">
<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><a class="anchor" id="gga0a276b3957264b6d9a4ee7af297d0b34aca42c074332be0f2a766afb361c34f00"></a>kHopping&#160;</td><td class="fielddoc">
<p>Frequency hopping spread spectrum </p>
</td></tr>
<tr><td class="fieldname"><a class="anchor" id="gga0a276b3957264b6d9a4ee7af297d0b34a6ddd6b8071bdfdeacef32e59eed44e3a"></a>kDTS&#160;</td><td class="fielddoc">
<p>Single frequency operation </p>
</td></tr>
</table>

</div>
</div>
<a class="anchor" id="ga28163474abc4f10ccf9241e6c0a1422e"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">enum <a class="el" href="group___open_r_f.html#ga28163474abc4f10ccf9241e6c0a1422e">tListenModes</a></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Enumerates listening modes </p>
<table class="fieldtable">
<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><a class="anchor" id="gga28163474abc4f10ccf9241e6c0a1422ea54a69a9ab72289fb1f93bca56e7349ab"></a>kBlockingListenForPacket&#160;</td><td class="fielddoc">
<p>Block until a packet is received or an error occurs </p>
</td></tr>
<tr><td class="fieldname"><a class="anchor" id="gga28163474abc4f10ccf9241e6c0a1422ea9da7444f0f36e477afb09e13e249ddab"></a>kBlockingDetectChannelActivity&#160;</td><td class="fielddoc">
<p>Block until channel activity detection is complete. If CAD is true, will block until a packet is received. </p>
</td></tr>
<tr><td class="fieldname"><a class="anchor" id="gga28163474abc4f10ccf9241e6c0a1422ea8b854978b0c33269d0abca27cd940967"></a>kListenForPacket&#160;</td><td class="fielddoc">
<p>Start listening for a packet and return immediately. Events will fire when a packet is received or when there is an error </p>
</td></tr>
<tr><td class="fieldname"><a class="anchor" id="gga28163474abc4f10ccf9241e6c0a1422ea621cc4768aff539cfec1fc9814a8befa"></a>kDetectChannelActivity&#160;</td><td class="fielddoc">
<p>Start listening for channel activity. Events will fire if CAD fails, when a packet is received, or when there is an error </p>
</td></tr>
</table>

</div>
</div>
<a class="anchor" id="ga0191e76d54bb003723263a47fa9a7101"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">enum <a class="el" href="group___open_r_f.html#ga0191e76d54bb003723263a47fa9a7101">tOpenRFStates</a></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Enumerates all of the possible states of the OpenRF stack. </p>
<table class="fieldtable">
<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><a class="anchor" id="gga0191e76d54bb003723263a47fa9a7101a19d8199da79ca4c28eb644052b08f632"></a>kIdle&#160;</td><td class="fielddoc">
<p>Idle state - Lowest radio power state </p>
</td></tr>
<tr><td class="fieldname"><a class="anchor" id="gga0191e76d54bb003723263a47fa9a7101aa20cbba7c3fbef0687f9aad998e94a0e"></a>kTransmitting&#160;</td><td class="fielddoc">
<p>Transmitting state </p>
</td></tr>
<tr><td class="fieldname"><a class="anchor" id="gga0191e76d54bb003723263a47fa9a7101ad6cfbd04bb1785e5347062ce124ec4dc"></a>kListening&#160;</td><td class="fielddoc">
<p>Listening for a packet </p>
</td></tr>
<tr><td class="fieldname"><a class="anchor" id="gga0191e76d54bb003723263a47fa9a7101add8280cdb1cba70addb16dee65ca02e6"></a>kWaitingForAck&#160;</td><td class="fielddoc">
<p>Waiting for an ack </p>
</td></tr>
<tr><td class="fieldname"><a class="anchor" id="gga0191e76d54bb003723263a47fa9a7101a6d54cce02512d451a161a1d1dcf273e6"></a>kSendAck&#160;</td><td class="fielddoc">
<p>Need to send an ack </p>
</td></tr>
<tr><td class="fieldname"><a class="anchor" id="gga0191e76d54bb003723263a47fa9a7101a159a728c690010955c411e6dc314e4eb"></a>kSendingAck&#160;</td><td class="fielddoc">
<p>Sending an ack </p>
</td></tr>
<tr><td class="fieldname"><a class="anchor" id="gga0191e76d54bb003723263a47fa9a7101a2b19c68e5a1e48fcb1227d09382413de"></a>kAckRequired&#160;</td><td class="fielddoc">
<p>Need to listen for an ack </p>
</td></tr>
<tr><td class="fieldname"><a class="anchor" id="gga0191e76d54bb003723263a47fa9a7101a6a5907d52deb390eec3e544e19e45b33"></a>kReceiving&#160;</td><td class="fielddoc">
<p>Receiving a packet right now </p>
</td></tr>
<tr><td class="fieldname"><a class="anchor" id="gga0191e76d54bb003723263a47fa9a7101a9b1fddf44bce966b60624b8566da0f5e"></a>kPacketReceived&#160;</td><td class="fielddoc">
<p>A fully qualified packet has been received </p>
</td></tr>
<tr><td class="fieldname"><a class="anchor" id="gga0191e76d54bb003723263a47fa9a7101a1bec80a402b7a72ae776bf8631871643"></a>kPacketTransmitted&#160;</td><td class="fielddoc">
<p>Last packet is fully transmitted. If the packet required an ACK, then the ACK has been received </p>
</td></tr>
<tr><td class="fieldname"><a class="anchor" id="gga0191e76d54bb003723263a47fa9a7101a74a1f26f67179126aeb97c91122d251f"></a>kRadioError&#160;</td><td class="fielddoc">
<p>An error happened while trying to use the radio </p>
</td></tr>
</table>

</div>
</div>
<a class="anchor" id="ga75b3ac4a450160131d80d0178b974101"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">enum <a class="el" href="group___open_r_f.html#ga75b3ac4a450160131d80d0178b974101">tTransmitErrors</a></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Enumerates all possible errors that can happen in the transmit process </p>
<table class="fieldtable">
<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><a class="anchor" id="gga75b3ac4a450160131d80d0178b974101a09c3a6fa88cf4c80c7516b2d657894a5"></a>kNoAck&#160;</td><td class="fielddoc">
<p>An ack was required but none was received </p>
</td></tr>
<tr><td class="fieldname"><a class="anchor" id="gga75b3ac4a450160131d80d0178b974101af83ce339764c3382ff1436195925846d"></a>kFifoUnderflow&#160;</td><td class="fielddoc">
<p>The FIFO underflowed, meaning more bytes were extracted than were put in </p>
</td></tr>
<tr><td class="fieldname"><a class="anchor" id="gga75b3ac4a450160131d80d0178b974101a02dea8a7ec5fd46f76769a41e827093b"></a>kFifoOverflow&#160;</td><td class="fielddoc">
<p>The FIFO overflowed, meaning too many bytes were put into the FIFO </p>
</td></tr>
<tr><td class="fieldname"><a class="anchor" id="gga75b3ac4a450160131d80d0178b974101af2cd3231820315500697550960956126"></a>kUndefined&#160;</td><td class="fielddoc">
<p>Undefined error </p>
</td></tr>
</table>

</div>
</div>
<h2 class="groupheader">Function Documentation</h2>
<a class="anchor" id="ga3cbbee7672821bd775d8c9dc295f7b53"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void OpenRFInitialize </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structt_open_r_f_initializer.html">tOpenRFInitializer</a>&#160;</td>
          <td class="paramname"><em>ini</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Initialize the OpenRF stack </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">ini</td><td>Initialization structure </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="ga6d63157afa39c547cb02c5b71455c2cc"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void OpenRFListenForPacket </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group___radio.html#gaceb4f15c2a65dde634322d4ab88c88ff">tReceiveModes</a>&#160;</td>
          <td class="paramname"><em>mode</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">U16&#160;</td>
          <td class="paramname"><em>period</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Start listening for a packet </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">mode</td><td>0=Continuous, 1=ContinuousScan, 2=Periodic, 3=PeriodicScan </td></tr>
    <tr><td class="paramname">period</td><td>Sleep period (if applicable) in mSec </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="ga66e3018afaf75239d092833054be068f"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group___open_r_f.html#ga0191e76d54bb003723263a47fa9a7101">tOpenRFStates</a> OpenRFLoop </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>This needs to be called once per main loop. All internal OpenRF processing happens in here. </p><dl class="section return"><dt>Returns</dt><dd>Current state of the OpenRF stack. </dd></dl>

</div>
</div>
<a class="anchor" id="ga796c67f936c99b026c94c11d02cf0900"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">U8 OpenRFReadyToSend </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Check to see if we can send a packet </p><dl class="section return"><dt>Returns</dt><dd>0=Not ready to send, &gt;=1 = Ready to send </dd></dl>

</div>
</div>
<a class="anchor" id="gaed105eca7e470e79e9a2ac4bd4aa8863"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void OpenRFSendPacket </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="union_u_u32.html">UU32</a>&#160;</td>
          <td class="paramname"><em>destAddress</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group___radio.html#gaba81c4c5fad7e2e0cef01f8e6c710ecb">tPacketTypes</a>&#160;</td>
          <td class="paramname"><em>packetType</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">U8&#160;</td>
          <td class="paramname"><em>length</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">U8 *&#160;</td>
          <td class="paramname"><em>txBuffer</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Queues a packet for transmission </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">destAddress</td><td>Destination MAC address </td></tr>
    <tr><td class="paramname">packetType</td><td>Type of packet </td></tr>
    <tr><td class="paramname">length</td><td>Length of SDU </td></tr>
    <tr><td class="paramname">txBuffer</td><td>Buffer containing SDU </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="ga125323cedc2d6ffa7a8a6c32d2696111"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void OpenRFSetPreamble </td>
          <td>(</td>
          <td class="paramtype">U16&#160;</td>
          <td class="paramname"><em>pre</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Set the preamble length used in subsequent transmissions </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">pre</td><td>length of preamble symbols </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="ga721e6eb444576558b3b0eb11b11068c8"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void OpenRFSleep </td>
          <td>(</td>
          <td class="paramtype">U8&#160;</td>
          <td class="paramname"><em>level</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Enter low power sleep mode </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">level</td><td>Low power level (0-3 with 3 being lowest power) </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Sat Sep 20 2014 15:04:07 for OpenRF by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.8
</small></address>
</body>
</html>
